<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="format-detection" content="telephone=no">
    <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="/Flat-UI/css/flat-ui.min.css" rel="stylesheet" type="text/css">
    <link href="/css/home.css" rel="stylesheet" type="text/css">
    <link href="/css/profile.css" rel="stylesheet" type="text/css">
    <link href="/css/admin.css" rel="stylesheet" type="text/css">
    <script src="/bootstrap/js/jquery-3.2.1.min.js"></script>
    <script src="/js/jquery.cookie.js"></script>
    <script src="/js/home.js"></script>
    <script src="/js/background.js"></script>
    <title>管理页面</title>
</head>
<body>
<!--网页头-->
<script src="/js/head.js"></script>
<!--网页体-->
<div class="main">
    <div class="p-body">
        <!--城市以及语言管理-->
        <div class="p-panel">
            <h3 class="text-center">城市及语言管理</h3>
            <!--城市管理-->
            <div class="row city">
                <div class="col-sm-1 text-right">城市:</div>
                <div class="col-sm-10">
                    <div class="bootstrap-tagsinput">
                    </div>
                </div>
                <div class="col-sm-1 text-left">
                    <button  class="btn btn-primary" data-toggle="modal" data-target="#city">
                        <span class="glyphicon glyphicon-plus"></span>
                    </button>
                </div>
            </div>
            <!--语言管理-->
            <div class="row language">
                <div class="col-sm-1 text-right">语言:</div>
                <div class="col-sm-10">
                    <div class="bootstrap-tagsinput">

                    </div>
                </div>
                <div class="col-sm-1 text-left">
                    <button  class="btn btn-primary" data-toggle="modal" data-target="#language">
                        <span class="glyphicon glyphicon-plus"></span>
                    </button>
                </div>
            </div>

            <div class="row text-center">
                <button class="btn btn-danger" data-toggle="modal" data-target="#pwd">修改管理员密码</button>
            </div>
            <!--修改密码modal-->
            <div class="modal fade" id="pwd" tabindex="-1" role="dialog">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title">修改密码</h4>
                        </div>
                        <div class="modal-body">
                            <div class="p-line row">
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" placeholder="旧密码" name="oldPwd">
                                </div>
                            </div>
                            <p class="text-center">密码长度要大于8位</p>
                            <div class="p-line row">
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" placeholder="新密码" name="pwd">
                                </div>
                                <div class="col-sm-2 sign-pwd">

                                </div>
                            </div>
                            <div class="p-line row">
                                <div class="col-sm-10">
                                    <input type="password" class="form-control" placeholder="重复新密码" name="rpwd">
                                </div>
                                <div class="col-sm-2 sign-rpwd">

                                </div>
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-primary" onclick="changeMistake()">确定</button>
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        </div>
                    </div>
                </div>
            </div>
            <!--新增语言modal-->
            <div class="modal fade" id="language" tabindex="-1" role="dialog">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title">新增语言</h4>
                        </div>
                        <div class="modal-body">
                            <input type="text" class="form-control" placeholder="语言名" name="language-name">
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-primary" onclick="addLanguage()" data-dismiss="modal">确定</button>
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        </div>
                    </div>
                </div>
            </div>
            <!--新增城市modal-->
            <div class="modal fade" id="city" tabindex="-1" role="dialog">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title">新增城市</h4>
                        </div>
                        <div class="modal-body">
                            <input type="text" class="form-control" placeholder="城市名" name="city-name">
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-primary" onclick="addCity()" data-dismiss="modal">确定</button>
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--人员管理-->
        <div class="p-panel">
            <div class="container-fluid">
                <div class="row text-center p-line">
                    <button class="btn btn-primary" type="button" onclick="addProfile()">新增翻译员</button>
                </div>
                <!--翻译人卡片-->
                <div class="row" id="card">
                </div>
            </div>
            <!--分页条-->
            <div class="container-fluid text-center" id="page">

            </div>
        </div>
        <div class="clearfix"></div>
    </div>
</div>

<!--网页脚-->
<script src="/js/foot.js"></script>
<script src="/Flat-UI/js/flat-ui.min.js"></script>
<script src="js/manage.js"></script>
<script>

    $(".modal").keydown(function (event) {
        if(event.which==13){
            $(this).find(".modal-footer").find(".btn-primary").trigger("click");
        }
    })
</script>
</body>
</html>